home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / patches / symantec / rtlinc.exe / CTYPE.H < prev    next >
C/C++ Source or Header  |  1993-07-09  |  2KB  |  78 lines

  1. /*_ ctype.h   Fri Apr 28 1989   Modified by: Walter Bright */
  2.  
  3. #ifndef __CTYPE_H
  4. #define __CTYPE_H    1
  5.  
  6. #if __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. #ifdef __STDC__
  11. #define __CDECL
  12. #define __STDCALL
  13. #else
  14. #define __CDECL __cdecl
  15. #define __STDCALL __stdcall
  16. #endif
  17.  
  18. #if __OS2__ && __INTSIZE == 4
  19. #define __CLIB    __STDCALL
  20. #else
  21. #define __CLIB    __CDECL
  22. #endif
  23.  
  24. #define _SPC    8    /* white space        */
  25. #define _CTL    0x20    /* control char        */
  26. #define _BLK    0x40    /* ' '            */
  27. #define _HEX    0x80    /* hex digit        */
  28. #define _UC    1    /* upper case letter    */
  29. #define _LC    2    /* lower case letter    */
  30. #define _PNC    0x10    /* punctuation        */
  31. #define _DIG    4    /* dig            */
  32.  
  33. extern const char __CLIB _ctype[];
  34. typedef unsigned short wchar_t;
  35.  
  36. int    __CLIB isalnum(int);
  37. int    __CLIB isalpha(int);
  38. int    __CLIB iscntrl(int);
  39. int    __CLIB isdigit(int);
  40. int    __CLIB isgraph(int);
  41. int    __CLIB islower(int);
  42. int    __CLIB isprint(int);
  43. int    __CLIB ispunct(int);
  44. int    __CLIB isspace(int);
  45. int    __CLIB isupper(int);
  46. int    __CLIB isxdigit(int);
  47. int    __CLIB toupper(int);
  48. int    __CLIB tolower(int);
  49.  
  50. #define isalnum(c)    (_ctype[(c)+1]&(_UC|_LC|_DIG))
  51. #define isalpha(c)    (_ctype[(c)+1]&(_UC|_LC))
  52. #define iscntrl(c)    (_ctype[(c)+1]&_CTL)
  53. #define isdigit(c)    (_ctype[(c)+1]&_DIG)
  54. #define isgraph(c)    (_ctype[(c)+1]&(_UC|_LC|_DIG|_PNC))
  55. #define islower(c)    (_ctype[(c)+1]&_LC)
  56. #define isprint(c)    (_ctype[(c)+1]&(_UC|_LC|_DIG|_PNC|_BLK))
  57. #define ispunct(c)    (_ctype[(c)+1]&_PNC)
  58. #define isspace(c)    (_ctype[(c)+1]&_SPC)
  59. #define isupper(c)    (_ctype[(c)+1]&_UC)
  60. #define isxdigit(c)    (_ctype[(c)+1]&_HEX)
  61.  
  62. #define _tolower        tolower
  63. #define _toupper        toupper
  64. #ifndef __STDC__
  65.  
  66. #define isascii(c)    ((unsigned)(c)<0200)
  67. #define __isascii(c)    ((unsigned)(c)<0200)
  68. #define toascii(c)    ((c)&0x7F)
  69. #define __toascii(c)    ((c)&0x7F)
  70.  
  71. #endif
  72.  
  73. #if __cplusplus
  74. }
  75. #endif
  76.  
  77. #endif /* __CTYPE_H */
  78.